/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package DAO;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Arthur
 */
public class ConnexionDB {

    private static String url = "jdbc:mysql://localhost";
    private static String user = "root";
    private static String passwd = "";
    private static Connection connect;

    public static Connection getInstance() {
        if (connect == null) {
            try {  
                connect = DriverManager.getConnection(url, user, passwd);
            } catch (SQLException ex) {
                Logger.getLogger(ConnexionDB.class.getName()).log(Level.SEVERE, null, ex);
                System.out.println("Erreur : connexionDB");
            }

     

        }
        return connect;
    }
}
